<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../node_modules/react/umd/react.development.js"></script>
    <script src="../node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="../node_modules/babel-standalone/babel.min.js"></script>
  </head>
  <body>
    <div id="reactDom"></div>
    <script type="text/babel">
      let obj = {
        name: "xixi",
        age: 18,
        sex: "男",
      };
      console.log(Object.keys(obj));
      let myDom = (
        <div>
          {Object.keys(obj).map((v, i) => {
            return (
              <p key={i}>
                遍历的属性是：{v}-------遍历出来的值是:{obj[v]}
              </p>
            );
          })}
        </div>
      );

      ReactDOM.render(myDom, document.getElementById("reactDom"));
    </script>
  </body>
</html>
